home *** CD-ROM | disk | FTP | other *** search
/ Aminet 16 / Aminet 16 (1996)(GTI - Schatztruhe)[!][Dec 1996].iso / Aminet / comm / bbs / TA1_22.lha / Rexx / TrShell.trans < prev   
Text File  |  1994-03-23  |  2KB  |  55 lines

  1. /* Starts up TrShell.  TrShell is a simple remote shell for TransAmiga
  2.    that uses the FIFO: device and fifo.library by Matt Dillon.  This is a
  3.    fully interactive shell, unlike the one that is (used to be) in
  4.    TransAmiga's SysOp menu.  This means that applications designed for CLI
  5.    usage can actually be run through the BBS.
  6.  
  7.    To run it, you must first startup up a CLI process, and redirect its
  8.    I/O to FIFO:.  The flags for FIFO: (what appears after the /) cannot be
  9.    changed, but the rest can be.  For example, I like to use the Commodore
  10.    shell, but you could use AShell, or CSh or any other shell. 
  11.    s:TrShell-Startup is a simple script file that sets the prompt and a
  12.    few aliases, nothing fancy.  The TrShell command line merely specifies
  13.    what the current BBS line is (-n) and the name of the FIFO: to use (-f,
  14.    make sure this is EXACTLY the same as what you give in the line above).
  15.    
  16.    If you wanted to run some kind of door through TrShell, you would have
  17.    your shell execute that in it's startup script.  BE SURE TO HAVE THE
  18.    SHELL END IMMEDIATELY AFTER THAT COMMAND TERMINATES!  While TrShell is
  19.    actives, users are in YOUR shell on YOUR computer.  So unless you are
  20.    using this as a straight remote shell (which only you should have access
  21.    to), have the last command terminate your shell (eg. 'EndShell' if you
  22.    are using Commodore's shell).
  23.  
  24.    Addition:
  25.    This improved script offers a kind of security. You are asked for a
  26.    password. You can change the password at line 34. Is has to be upper
  27.    case and a maximum of 9 characters or you can't login. If you don't want
  28.    a password check use the script of TransAmiga v1.11 release.
  29.  
  30. */
  31.  
  32. options results
  33.  
  34. CHECKPSWD="SECRET"                        /* Change this */
  35.  
  36. PRAGMA('stack','50000')
  37. CLS
  38. PROMPT 9 'HIDE' '"Please enter Password: "'
  39. PASSWORD=RESULT
  40.  
  41. systeminfo 8 ; bbsline=result
  42. id=time(s)
  43.  
  44. PASSWORD=UPPER(PASSWORD)
  45. IF PASSWORD="###PANIC" THEN EXIT
  46. IF ~(PASSWORD=CHECKPSWD) THEN DO
  47.   PRINT 'ACCESS DENIED!!!'
  48.   CONTINUE
  49.   EXIT
  50. END
  51. address command 'NewShell FIFO:trshell'id'/rwkecs'
  52. address command 'BBS:Bin/TrShell -n'bbsline' -ftrshell'id
  53. continue
  54. exit
  55.